package com.hnevc.liangxiangju;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *
 * 使用FileInputStream 读取文件
 */
public class Example02 {
    public static void main(String[] args) {
        try {
            FileInputStream in =new FileInputStream("text.txt");
            int b=0;
            while (true){
                b= in.read();
                if(b==-1){
                    break;
                }
                System.out.println(b);
            }
            in.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
